<?php

class MessageController extends BaseController {

	/*
	|--------------------------------------------------------------------------
	| Default message Controller
	|--------------------------------------------------------------------------
	|
	| 
	|
	|	Route::get('/', 'HomeController@showWelcome');
	|
	*/


    /**
     * The layout that should be used for responses.
     */
    protected $layout = 'layouts.master';


	public function message($user_id)
	{

	  
        $messages =DB::table('message')->where('receiver_id','=',$user_id)->get();
       
		$data=['messages'=>$messages];	
		
		$this->layout->content = View::make('message.messages',$data);
	}

}